#ifndef ROUNDRECTITEM_H
#define ROUNDRECTITEM_H

#include <QPainter>
#include <QGraphicsItem>
#include <QGraphicsSceneMouseEvent>

/**
 * @brief The RoundRectItem class
 * 自定义圆角矩形
 */
class RoundRectItem : public QGraphicsRectItem
{
public:
    explicit RoundRectItem(QGraphicsItem *parent = Q_NULLPTR);
    RoundRectItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = Q_NULLPTR);
    RoundRectItem(QRectF &rect, QGraphicsItem *parent = Q_NULLPTR);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;

private:
    QRectF rRect;
};

#endif // ROUNDRECTITEM_H
